package com.fwixvye.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fwixvye.pojo.Weapon;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 武器列表 Mapper 接口
 * </p>
 *
 * @author fwixvye
 * @since 2024-02-11
 */
@Mapper
public interface WeaponMapper extends BaseMapper<Weapon> {


    /**
     * @param weapon 插入武器的接口
     */
    @Insert("insert into weapon(name, mainEntry, secEntry, secEntryType, weaponEffectName, weaponEffectContent, WeaponCategories, WeaponStar) " +
            "VALUES (#{name},#{mainEntry},#{secEntry},#{secEntryType},#{weaponEffectName},#{weaponEffectContent},#{WeaponCategories},#{WeaponStar})")
    public void AddWeaponData(Weapon weapon);



    @Select("select * from weapon where name = #{weaponImgUrl}")
    Weapon selectAllByName(String weaponImgUrl);
}
